function divSliderClick(){
		var Q = jQuery;//.noConflict();
			  	var player  = {index:0,isNext:false},Qli_arr = Q(".nav-tabs > li");
			        Qli_arr.bind("click",function(){
			 		var Qqh = Q(".div_slider");
					if(player.isNext){
						return ;
					}												
					player.isNext = true;
		 			var num = Qqh.size();//兄弟个数
		 			var index = Q(this).index(),//当前索引
		 			indexs=Q(this).index()+1;//当前索引+1
		 			
		 			var ow = Qqh.eq(index)[0].offsetWidth;
		 			//var ol = Qqh.eq(index)[0].offsetLeft;
					var olw = player.index-index;
		 			
	 				ow = Math.abs(ow);
	 				
	 				if(olw<0){olw=-olw;}
	 				if(index < num ){//&& index >player.index
	 					if(index >player.index){
	 					Qqh.animate({
	 						left:'-='+(ow*olw)
	 					},function(){
	 						 player.index = index;
	 						 //console.dir("player.index2==========="+player.index);
	 					});}		
	 				}
	 				if(index < player.index){
		 				Qqh.animate({
		 					left:'+='+(ow*olw)
		 				},function(){
		 					 player.index = index;
		 				});
	 			  }
	 				
	 			  Q(this).addClass("active").siblings().removeClass("active");

	 			  Qli_arr.eq(index).attr("complete",1);
		 			setTimeout(function(){
		 				player.isNext= false;
		 			},600);
				  }); 
					
		 }
/**
 * author:龚佳新  
 * date:2013-11-27
 * 资产结构模型 方法全部抽取 为目前最精简模式
 */
Cnbi.model.Debt= function(params) {
   Cnbi.model.BaseSliderAndProgress.call(this,params); 
   var scope = this,domArray = params["domArray"];  
   
   function getColorFont(color,text){
     return '<font size="2"  color="'+color+'" style="font-family:微软雅黑;font-weight:bold;margin-left:20px">'+text+'</font>'
   }
       	
   this.initPage=function(){
	   if(!scope.flag){//alert("子类的initPage");
	    	divSliderClick();
	        CnbiSoft.setCurrentRenderer("JavaScript");
	   }
       
	   setFormula(false);
	   scope.setSliderValue(params.slider_array, scope.datas, "Idinput");
	   scope.setProgressValue(params.progress_array,scope.datas, "Idspan");
	   updateTip();
	   this.initChart(true);
	     	
    }
    
    this.initChart=function(action){ 
    	var sdbv = params["judgeObj"]["sdbv"],
    	    lxbzbs = params["judgeObj"]["lxbzbs"];
    	
        var obj1={domId:domArray[0],datas:scope.datas[sdbv]-0,range:scope.industyParams[sdbv],title:'速动比率行业对标预警'},
            obj2={domId:domArray[1],datas:scope.datas[lxbzbs]-0,range:scope.industyParams[lxbzbs],title:'利息保障倍数行业对标预警'};  	  
      	
      	if(action)new Cnbi.model.Chart(getAngularGaugeObj1(obj1)); 
      	if(action)new Cnbi.model.Chart(getAngularGaugeObj2(obj2));
   
    }    	            
    var upperLimit=0.00;
     function getAngularGaugeObj1(params){
    	var range = params["range"];upperLimit=range["excellent"]-0;	
      	if((params["datas"]-0)>upperLimit){
      		upperLimit = params["datas"]-0;
      	}
     	var dialsAttr  =' bgColor="000000,4D4D4D" borderAlpha="0" baseWidth="18" topWidth="1" rearExtension="40" valueY="295" radius="80"',
        attributes ='manageResize="1" origW="350"  origH="200"  manageValueOverlapping="1"  showValue="1" showTickValues="0"  tickValueDistance="0" bgColor="FFFFFF" showLimits="1"  upperLimit="'+upperLimit+'" lowerLimit="'+range["lowers"]+'" baseFontColor="000000"  majorTMNumber="11" majorTMColor="2F2E2E"  majorTMHeight="20" majorTMThickness="2" minorTMNumber="4" minorTMColor="2F2E2E" minorTMHeight="10" showGaugeBorder="0" gaugeOuterRadius="100" gaugeInnerRadius="70" gaugeOriginX="210" gaugeOriginY="210" gaugeAlpha="50" placeValuesInside="1" toolTipBgColor="FFFFFF" toolTipBorderColor="CCCCCC" gaugeFillMix="" showShadow="0" annRenderDelay="0" pivotRadius="13" pivotFillMix="{E6E6E6},{999999}" pivotBorderColor="bebcb0" pivotFillRatio="70,30" showBorder="0" gaugeStartAngle="230" gaugeEndAngle="-50"',
    	annotations='<annotationGroup x="210" y="210" showBelow="1">\n\
						<annotation  type="circle" x="0" y="0" radius="125" fillColor="35BADC,35BDDF, C5F4FF"  fillRatio="70,20, 10" borderColor="35BADC" />\n\
						<annotation type="circle" x="0" y="0" radius="110" fillColor="FFFFFF, FFFFFF" fillRatio="20,80" borderColor="FFFFFF" />\n\
						<annotation type="circle" x="0" y="0" radius="110"  fillColor="E6E6E6, FFFFFF" fillAlpha="50" borderColor="E6E6E6" />\n\
					</annotationGroup>',     
         styles='<definition>'
			+ '<style type="font" name="a" bgColor="FF0000" size="14" borderColor="FF0000"  baseFontColor="FF0000" />'
			+ '<style name="MyFirstBevel" type="Bevel" />'
			+ '</definition>'
			+ '<application>'
			+ '<apply toObject="Value" styles="a"/>'
			+ '<apply toObject="Value" styles="MyFirstBevel"/>'
			+ '</application>';
	          			
        return {chartType:0,//图表类型 ：0为单值数据图表;1为多单数据图表;2为多系数据图表
	            swfName:"AngularGauge",//这个就不用说了吧！  //AngularGauge.swf
	            datas:params["datas"],//显示的数据  注意：规定的数据解析格式  numberSuffix="%"
	            domId:domArray[0],//渲染的dom节点
	            attributes:attributes,
	            color:["FF0000","EEC900","00CD00"], //颜色good 
	            dialsAttr:dialsAttr,
	            styles:styles,
	            annotations:annotations,
	          	colorRange:[range["lowers"],range["average"],range["good"],upperLimit],//chartType==0时才有此属性
	          	width:260,height:300};
    };
    
    function getAngularGaugeObj2(params){
    	var range = params["range"];upperLimit=range["excellent"]-0;	
     	if((params["datas"]-0)>upperLimit){
     		upperLimit = params["datas"]-0;
     	}

     	var dialsAttr  =' bgColor="000000,4D4D4D" borderAlpha="0" baseWidth="18" topWidth="1" rearExtension="40" valueY="295" radius="80"',
        attributes ='manageResize="1" origW="350"  origH="200"  manageValueOverlapping="1"  showValue="1" showTickValues="0"  tickValueDistance="0" bgColor="FFFFFF" showLimits="1"  upperLimit="'+upperLimit+'" lowerLimit="'+range["lowers"]+'" baseFontColor="000000"  majorTMNumber="11" majorTMColor="2F2E2E"  majorTMHeight="20" majorTMThickness="2" minorTMNumber="4" minorTMColor="2F2E2E" minorTMHeight="10" showGaugeBorder="0" gaugeOuterRadius="100" gaugeInnerRadius="70" gaugeOriginX="210" gaugeOriginY="210" gaugeAlpha="50" placeValuesInside="1" toolTipBgColor="FFFFFF" toolTipBorderColor="CCCCCC" gaugeFillMix="" showShadow="0" annRenderDelay="0" pivotRadius="13" pivotFillMix="{E6E6E6},{999999}" pivotBorderColor="bebcb0" pivotFillRatio="70,30" showBorder="0" gaugeStartAngle="230" gaugeEndAngle="-50"',
    	annotations='<annotationGroup x="210" y="210" showBelow="1">\n\
						<annotation  type="circle" x="0" y="0" radius="125" fillColor="35BADC,35BDDF, C5F4FF"  fillRatio="70,20, 10" borderColor="35BADC" />\n\
						<annotation type="circle" x="0" y="0" radius="110" fillColor="FFFFFF, FFFFFF" fillRatio="20,80" borderColor="FFFFFF" />\n\
						<annotation type="circle" x="0" y="0" radius="110"  fillColor="E6E6E6, FFFFFF" fillAlpha="50" borderColor="E6E6E6" />\n\
					</annotationGroup>',     
         styles='<definition>'
			+ '<style type="font" name="a" bgColor="FF0000" size="14" borderColor="FF0000"  baseFontColor="FF0000" />'
			+ '<style name="MyFirstBevel" type="Bevel" />'
			+ '</definition>'
			+ '<application>'
			+ '<apply toObject="Value" styles="a"/>'
			+ '<apply toObject="Value" styles="MyFirstBevel"/>'
			+ '</application>';
	          			
        return {chartType:0,//图表类型 ：0为单值数据图表;1为多单数据图表;2为多系数据图表
	            swfName:"AngularGauge",//这个就不用说了吧！  //AngularGauge.swf
	            datas:params["datas"],//显示的数据  注意：规定的数据解析格式  numberSuffix="%"
	            domId:domArray[1],//渲染的dom节点
	            attributes:attributes,
	            color:["FF0000","EEC900","00CD00"], //颜色good 
	            dialsAttr:dialsAttr,
	            styles:styles,
	            annotations:annotations,
	          	colorRange:[range["lowers"],range["average"],range["good"],upperLimit],//chartType==0时才有此属性
	          	width:260,height:300};
    };
    
    this.updataInputAfter=function(id ,value,datas){		
		setFormula(true); 
		
		updateTip();
	};
	
	function setFormula(action) {
		scope.initBefore();
		
		var  chartId=domArray[0].toString()+domArray[3].toString();		     		
	    if(getChartFromId(chartId)){
	       //console.dir(params["judgeObj"]["sdbv"]+"=="+scope.datas[params["judgeObj"]["sdbv"]]);
	    	/*var tempData = scope.datas[params["judgeObj"]["sdbv"]]-0;
	    	if((scope.datas[params["judgeObj"]["sdbv"]]-0)> upperLimit){
	    		tempData =upperLimit;
	        }
	        getChartFromId(chartId).setData(1,tempData);*/
	        getChartFromId(chartId).setData(1,scope.datas[params["judgeObj"]["sdbv"]]);	       
	    }
	    /*if(getChartFromId(chartId)){
            var tempData = scope.datas[params["judgeObj"]["cbfyv"]]-0;
	        if((scope.datas[params["judgeObj"]["cbfyv"]]-0)> upperLimit){
	    		tempData =upperLimit;
	        }
	        getChartFromId(chartId).setData(1,tempData);
	    }*/
	    chartId=domArray[1].toString()+domArray[3].toString();	    
	    if(getChartFromId(chartId)){
	       //console.dir(params["judgeObj"]["lxbzbs"]+"=="+scope.datas[params["judgeObj"]["lxbzbs"]]);
	       /*var tempData = scope.datas[params["judgeObj"]["lxbzbs"]]-0;
	       if((scope.datas[params["judgeObj"]["lxbzbs"]]-0)> upperLimit){
	    		tempData =upperLimit;
	       }
	       getChartFromId(chartId).setData(1,tempData);*/
	       getChartFromId(chartId).setData(1,scope.datas[params["judgeObj"]["lxbzbs"]]);	       
	    }
	}
    
	var part2 = 0;
	function updateTip(){
     var cwfxxs = scope.datas[params["judgeObj"]["cwfxxs"]],
         xjzfnl = scope.datas[params["judgeObj"]["xjzfnl"]],
         dqjdsli = scope.datas[params["judgeObj"]["dqjdsli"]],
         yfpj = scope.datas[params["judgeObj"]["yfpj"]],
         chfzzfdxj = scope.datas[params["judgeObj"]["chfzzfdxj"]],
         ldfzzj = scope.datas[params["judgeObj"]["ldfzzj"]],
         ldbv = scope.datas[params["judgeObj"]["ldbv"]],
         sdbv = scope.datas[params["judgeObj"]["sdbv"]],
         ldbvzzv = scope.datas[params["judgeObj"]["ldbvzzv"]],
         ldzczzcszzv = scope.datas[params["judgeObj"]["ldzczzcszzv"]],
         jyywxzzzv = scope.datas[params["judgeObj"]["jyywxzzzv"]],
         xjzfnlsli = scope.datas[params["judgeObj"]["xjzfnlsli"]],
         lxbzbs = scope.datas[params["judgeObj"]["lxbzbs"]],
         dqjd = scope.datas[params["judgeObj"]["dqjd"]],
         lrzeLsli = scope.datas[params["judgeObj"]["lrzeLsli"]],
         cwfyLsli = scope.datas[params["judgeObj"]["cwfyLsli"]];
         
	 console.dir(xjzfnl);
         
	 if(cwfxxs < 1){
	 	 $("#dqcznlbhqk").html(getColorFont('red','<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从公司当期资本结构、借款利率和盈利水平三者的关系来看，公司增加负债不会增加公司的盈利水平，相反会降低公司现在的盈利水平。'));
	     }
	     else{$("#dqcznlbhqk").html( getColorFont('green','<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从公司当期资本结构、借款利率和盈利水平三者的关系来看，公司增加负债能够给企业带来利润的增加，负债经营可行。'))}
	 
	 $("#pt").html(getColorFont("green",'有现金支付能力的。<br>'));   
	 $("#pt").append(getColorFont('green','从发展角度来看，按照当前资产的周转速度和盈利水平，公司有能力偿还短期借款'));
	 if(xjzfnl <= 0 && dqjdsli > yfpj){//=IF(AND(现金支付能力<=0,短期借款的期末余额>应付票据的期末余额)
	 	    $("#pt").html(getColorFont('red','从支付能力来看，日常现金支付资金比较紧张，主要依靠短期借款。<br>'));
	 	    part2=0;
	 	 }
	 	 else if(xjzfnl <=0 && dqjdsli < yfpj){//IF(AND(现金支付能力<=0, 短期借款的期末余额<应付票据的期末余额),
	 	   	$("#pt").html(getColorFont('red','从支付能力来看，日常现金支付资金比较紧张，主要应付票据。<br>'));
	 	   	part2=0;
	 	 }
	 	 else if(chfzzfdxj < (1/2*ldfzzj)){	//=IF(偿还流动负债的资金<(1/2*流动负债合计的期末余额)
	 		if(part2==0){$("#pt").append(getColorFont('red','从发展角度来看，按照当前资产的周转速度和盈利水平，公司短期债务的偿还没有充足的资金保证，需要依靠借新债还旧债。')); 
	 		   ++part2;
	 		}	 	 	 	    
	 	 }  
	    
	 	$("#ldbvtexts").html(getColorFont("green",'用当期流动资产偿还流动负债，没有困难，流动比率比较合理。')); 
	    if(ldbv<=0.8){
	       $("#ldbvtexts").html(getColorFont('red',"当期流动比率过低，如果经营形势没有大的变化，偿还流动负债比较困难。"));
	    }
	    else if(scope.datas["ldbv"] <=1.2){
  		   $("#ldbvtexts").html(getColorFont('red',"流动资产处于相对较低水平，流动比率不太合理。"));	
		}
	 	
		$("#sdbvtexts").html(getColorFont("green",'速动资产充足，速动比率合理。'));
	    if(sdbv <=0.6){
	       $("#sdbvtexts").html(getColorFont("red",'速动资产过低，速动比率不太合理。'));
	    }else if(sdbv <1){
	       $("#sdbvtexts").html(getColorFont("red",'速动资产处于相对较低水平。'));
	    }
	    
	    $("#fst").html(getColorFont("green",'速动资产充足，速动比率合理。'));
	    if(ldbvzzv >1){
	      	$("#fst").html(getColorFont("green",'公司短期偿债能力有所提高'));
		    if(ldzczzcszzv < 0 &&  jyywxzzzv  < 0){
		        $("#fst").html(getColorFont("red",'公司短期偿债能力有所提高，但这种提高是在流动资产周转速度放慢、经营业务创造的现金净流入量下降的情况下实现的，可能是不可靠的。'));
		    }
		    if(ldzczzcszzv > 0 &&  jyywxzzzv  > 0){
		        $("#fst").html(getColorFont("green",'公司短期偿债能力提高，这是由公司流动资产周转速度加快、经营活动创造的现金净流量增加引起的，是可靠的。'));
		    } 
		 }else{
			  if(jyywxzzzv < 0 ){
	 			  $("#fst").html(getColorFont("red",'公司偿债压力增加，主要是由经营业务创造现金的能力下降引起的，表明流动负债所占资金来源的比例提高。'));
	 			  if(ldzczzcszzv < 0){
	 			      $("#fst").html(getColorFont("red",'公司短期偿债能力下降，主要是由经营业务萎缩、资产周转速度放慢、经营业务创造现金的能力下降引起的。'));
	 			  }
			  }else{
			 	  $("#fst").html(getColorFont("red",'公司短期偿债压力增加，但公司经营业务创造现金的能力并没有下降。'));
		   }	 	
	    }
	    
	    $("#xjzfnlslitext").html(getColorFont("green",'从短期来看，公司拥有支付利息的能力。'));
	    if(xjzfnlsli <=0 ){
	      	$("#xjzfnlslitext").html(getColorFont("green",'公司短期偿债能力有所提高'));
	      	if(dqjd > yfpj){
	      	  $("#xjzfnlslitext").html(getColorFont("red",'从短期来看，公司经营活动的资金主要依靠短期借款。全部偿还短期债务本息会有一定困难。'));
	      	}else if(dqjd < yfpj){
	      	  $("#xjzfnlslitext").html(getColorFont("red",'从短期来看，公司经营活动的资金主要依靠应付票据。全部偿还短期债务本息会有一定困难。'));
	      	}
	    }
	    if(cwfxxs<0){
	    	//if(cwfyLsli<0){	 		    
    		    $("#lxbzbstext").html(getColorFont("red",'本期财务费用为负，无法进行长期付息能力判断。'));
	    	/*}else if(cwfyLsli>=0){
	    		$("#lxbzbstext").html(getColorFont("red",''));
	    	}*/
    	}else{
    		//console.dir("cwfxxs====="+cwfxxs);
	 	    if(lrzeLsli < 0 ){
	 	     $("#lxbzbstext").html(getColorFont("red",'本期亏损，利息支出没有保障。'));
	 	    }else if(lrzeLsli == 0 ){
	 	     $("#lxbzbstext").html(getColorFont("red",'本期没有实现盈利，利息支出没有保障。'));
	 	    }else if(lrzeLsli > 0 ){
	 	    	 // tip = getColorFont("green",'从盈利情况来看，公司盈利对利息的保障倍数为"'+scope.datas["lxbzbs"] +'"倍。公司盈利能力对利息的保障程度比较差。');
	 	        if(lxbzbs < 1){
	 	        	$("#lxbzbstext").html(getColorFont("red",'从盈利情况来看，公司盈利对利息的保障倍数为"'+ lxbzbs +'"倍。公司盈利能力对利息的保障程度比较差。'));
	 	        }else if(lxbzbs < 4 ){
		 			$("#lxbzbstext").html(getColorFont("green",'从盈利情况来看，公司盈利对利息的保障倍数为"'+ lxbzbs +'"倍。公司盈利能力对利息的保障程度偏低。'));
				}else if(lxbzbs >=4 ){
 					$("#lxbzbstext").html(getColorFont("green",'从盈利情况来看，公司盈利对利息的保障倍数为"'+ lxbzbs +'"倍。从实现利润和利息的关系来看，公司盈利能力较强，利息支付有保证。'));
				}
	 	    } 
	 	} 
	 }
	 	 
     scope.init(); 
}
   	

Ext.onReady(function(){
	var slider_array=module["sliderItemScode"].split(","),
	params ={itemIndex:module["queryItemScode"],showDim:'item',povitDim:'item',queryFact:'B',company:'EVA1',type:"debt",year :qj.year,month :qj.month,unit :qj.unit},
    toolsMap = module["toolsMap"];
    slider_array.push(toolsMap["dqjdsli"]["scode"]);
    var bean =  new Cnbi.model.Debt({
    	id:module["id"],
		slider_array:slider_array,
		params:params,
		progress_array:[
		    toolsMap["fxfz"]["scode"],
		    toolsMap["sjjdlv"]["scode"], 
		    toolsMap["cwfxxs"]["scode"],
		    toolsMap["xjzfnl"]["scode"], 
		    toolsMap["chfzzfdxj"]["scode"],
		    toolsMap["ldbv"]["scode"], 
		    toolsMap["ldbvzzv"]["scode"],
		    toolsMap["ldzczzcszzv"]["scode"],
		    toolsMap["jyywxzzzv"]["scode"],
		    toolsMap["sdbv"]["scode"],
		    toolsMap["xjzfnlsli"]["scode"],
		    toolsMap["lxbzbs"]["scode"]],
		updateInput:'Idinput',
		pro:{width:170},
		sli:{width:155},
		doubleUIFlag:"sli",
		domArray:["sdbvId","lxbzId","chartId","_cnbi_chartId"],
		companyName:company["text"],
		judgeObj:{
		          cwfxxs:toolsMap["cwfxxs"]["scode"],
		          xjzfnl:toolsMap["xjzfnl"]["scode"],
		          dqjdsli:toolsMap["dqjdsli"]["scode"],
		          yfpj:toolsMap["yfpj"]["scode"],
		          chfzzfdxj:toolsMap["chfzzfdxj"]["scode"],
		          sdbv:toolsMap["sdbv"]["scode"],
		          ldbv:toolsMap["ldbv"]["scode"],
		          ldfzzj:toolsMap["ldfzzj"]["scode"],
		          ldbvzzv:toolsMap["ldbvzzv"]["scode"],
		          ldzczzcszzv:toolsMap["ldzczzcszzv"]["scode"],
		          ldfzzj:toolsMap["jyywxzzzv"]["scode"],
		          lxbzbs:toolsMap["lxbzbs"]["scode"],
		          dqjd:toolsMap["dqjd"]["scode"],
		          xjzfnlsli:toolsMap["xjzfnlsli"]["scode"],
		          lrzeLsli:toolsMap["lrzeLsli"]["scode"]
		         },
		module:module
	 }); 	 	
})